export default {
    data() {
        return {
            num:0
        }
    },
    created() {
        this.timer = setInterval(() => {
            console.log(this.num)
            this.num++
        },1000)
    },
    beforeDestroy() {
        clearInterval(this.timer)
    }
}